<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>会议室预约</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/meeting/css/style.css">
    <link rel="stylesheet" href="/assets/public/layermobile/css/layer.css">
</head>
<body>
<div class="wraper show-search" js="wapjs/meeting/js/index">
    <div class="head clearfix">
        <a href="javascript:history.back();" class="iconfont icon-zuo"></a>
        <span class="head-name">选择审核人员</span>
    </div>
    <div class="search">
        <p class="tips-text text-gray text-center"><span class='iconfont icon-sousuo'></span>搜索名字、拼音、手机号</p>
        <input class="search-input" name="search" value=""/>
    </div>
    <div class="lists notopblock">
        <div class="fullbox">
            <div class="level-box">
                <a href="#"n class="level" id="level-1">{BEESCRM:$accountInfo['account_name']}</a>
                <foreach name="departmentPath" item="vo">
                    <a href="#" class="level" id="level-2"><span class="iconfont icon-you"></span> {BEESCRM:$vo.department_name}</a>
                </foreach>
            </div>
        </div>
    </div>

    <div class="lists">

        <foreach name="department" item="vo">
            <a <if condition="$vo.peopleCount eq 0">href="javascript:void(0);"</if>
            <if condition="$vo.peopleCount neq 0">
                <if condition="$vo.hasChildDepartment eq 1">
                    href="{BEESCRM::U('/meeting/appointCheck/secondDepartment',array('basic_id' => $basicId,'account_id' => $accountId,'department_id' => $vo['department_id'],'level'=>$level))}"
                </if>
                <if condition="$vo.hasChildDepartment eq 2">
                    href="{BEESCRM::U('/meeting/appointCheck/selectPeople',array('basic_id' => $basicId,'account_id' => $accountId,'department_id' => $vo['department_id'],'level'=>$level))}"
                </if>
            </if> class="list-line">
                {BEESCRM:$vo.department_name}（{BEESCRM:$vo.peopleCount}人）
                <span class="iconfont icon-you next-level pull-right"></span>
            </a>
        </foreach>

    </div>
    <!--<div class="fixed-total">
        <div class="tb-mode">
            <div class="tb-cell"><span>已选择：37人</span></div>
            <div class="tb-cell"><a href="#" class="btn pull-right bg-green">确定（32/52）</a></div>
        </div>
    </div>-->
</div>
<div class="search-result">
</div>
<input type="hidden" name="user_id" id="user_id" value="" />
<input type="hidden" name="basicId" id="basicId" value="{BEESCRM:$basicId}" />
<input type="hidden" name="level" id="level" value="{BEESCRM:$level}" />
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script type="text/javascript" src="/assets/public/jquery-2.1.0.min.js"></script>
<script>
    $(document).on('blur','.search-input',function() {
        var data = {};
        data.search_content = $("input[name=search]").val();
        $.ajax({
            url : "/meeting/AppointCheck/searchPeople/account_id/"+"{BEESCRM:$accountId}",
            data : data,
            type : 'post',
            success : function(result){
                result = JSON.parse(result);
                console.log(result);
                if(result.status == 'S'){
                    //$('body').html('');
                    $('.show-search').css('display','none');
                    $('.search-result').html(result.message);
                }else{
                    fm.alert('操作失败');
                }
            }
        });
    })
</script>
</body>
</html>